/*
	Written By Pradipna Nepal
	www.pradsprojects.com

	Copyright (C) 2012 Prads Projects
	Please read COPYING.txt included along with this source code for more detail.
	If not included, see http://www.gnu.org/licenses/
*/

#ifndef LIBFUNCTIONTABLE_H
#define LIBFUNCTIONTABLE_H

#include <string>
#include <map>
#include <vector>
#include "resTokenTypes.h"
#include "libTokenModule.h"
#include "libHash.h"
#include "libPrintError.h"
using namespace std;
using namespace Hash;
using namespace PrintError;

struct Arguments {
	string type, name;
};

struct FunctionEntry {
	string name;
	string returnType;
	vector<Arguments> arguments;
	int address;
};

typedef multimap<unsigned int, FunctionEntry> FuncTable;

namespace FunctionTable {
	bool createFunctionTable(const vector<TokenModule> *modules, FuncTable *tOut);
}

#endif